import request from '@/utils/request'
// 楼宇列表查询
export function getBuilding(params) {
  return request({
    url: 'park/building',
    params
  })
}

// 新增楼宇
export function addBuilding(data) {
  return request({
    url: 'park/building',
    method: 'post',
    data
  })
}

// 编辑：数据回填
export function editBackfillBuilding(id) {
  return request({
    url: `park/building/${id}`
  })
}

// 编辑楼宇
export function editBuilding(data) {
  return request({
    url: `park/building`,
    method: 'put',
    data
  })
}

// 删除楼宇
export function delBuilding(id) {
  return request({
    url: `park/building/${id}`,
    method: 'DELETE'
  })
}
